import Vue from 'vue'
import Router from 'vue-router'

import login from '@/pages/login'  //登录
import index from '@/pages/index'  //首页

Vue.use(Router)

const router = new Router({
  mode: 'history',
  routes: [
    // {path: '/', redirect: '/home'},
    {path: '/', name: 'index', component: index,  redirect: '/home',
      children: [
        {path: '/',component: () => import('./components/home')},  //首页
        {path: '/trademark-service', component: () => import('./components/sbfw')},//商标
        {path: '/design-services', component: () => import('./components/sjfw')}, //设计
        {path: '/copyright-services', component: () => import('./components/bqfw')},//版权
        {path: '/patent-services',component: () => import('./components/zlfw')},//专利
        {path: '/enterprise-introduction',component: () => import('./components/aboutUs')},//公司介绍
        {path: '/news',component: () => import('./components/news')},//新闻资讯
        // {path: '/newsMess?id=:id', name: 'newsMess',component: () => import('./components/newsMess')},//新闻详情
        {path: '/newsMess', name: 'newsMess',component: () => import('./components/newsMess')},//新闻详情
      ]
    },
  ]
})

export default router
